package com.tyk.bookstore.back.payment.util;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tyk.bookstore.back.payment.manager.excel.model.AmountLogExcelVo;
import com.tyk.bookstore.back.payment.manager.excel.model.PaymentRecordExcelVo;
import com.tyk.bookstore.back.payment.manager.excel.model.ShopStatementExcelVo;
import com.tyk.bookstore.back.payment.model.entity.AmountLogDo;
import com.tyk.bookstore.back.payment.model.entity.PaymentRecordDo;
import com.tyk.bookstore.back.payment.model.entity.ShopStatementDo;
import com.tyk.bookstore.back.payment.model.query.*;
import com.tyk.bookstore.back.payment.model.vo.*;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

/**
 * @author tyk
 * @description MapStructPayment
 */
@Mapper(componentModel = "spring")
public interface MapStructPayment {
    AmountLogVo toAmountLogVo(AmountLogDo amountLog);

    AmountLogPageVo toAmountLogPageVo(Page<AmountLogDo> page);

    AmountLogDo toAmountLogDo(AmountLogAddQuery query);

    AmountLogDo toAmountLogDo(AmountLogUpdateQuery query);

    PaymentRecordVo toPaymentRecordVo(PaymentRecordDo paymentRecord);

    PaymentRecordPageVo toPaymentRecordPageVo(Page<PaymentRecordDo> page);

    PaymentRecordDo toPaymentRecordDo(PaymentRecordAddQuery query);

    PaymentRecordDo toPaymentRecordDo(PaymentRecordUpdateQuery query);

    ShopStatementVo toShopStatementVo(ShopStatementDo shopStatement);

    @Mapping(target = "records", ignore = true)
    ShopStatementPageVo toShopStatementPageVo(Page<ShopStatementDo> page);

    ShopStatementDo toShopStatementDo(ShopStatementAddQuery query);

    ShopStatementDo toShopStatementDo(ShopStatementUpdateQuery query);

    ShopStatementPageVo.ShopStatement toShopStatementPageVo$ShopStatement(ShopStatementDo shopStatementDo);

    List<ShopStatementExcelVo> toShopStatementExcelVoList(List<ShopStatementDo> doList);

    List<PaymentRecordExcelVo> toPaymentRecordExcelVoList(List<PaymentRecordDo> doList);

    List<AmountLogExcelVo> toAmountLogExcelVoList(List<AmountLogDo> doList);
}
